package com.smartstate.EnvironmentMonitor.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel(value = "EquipmentDTO", description = "电力设备DTO")
public class EquipmentDTO {
    private static final long serialVersionUID = 1L;


    private String id;

    @ApiModelProperty(value = "修改前的设备编码")
    private String beforeDeviceId;

    @ApiModelProperty(value = "修改前的设备编码")
    private String beforeName;

    @ApiModelProperty(value = "设备编码")
    private String deviceId;

    @ApiModelProperty(value = "设备名称")
    private String name;

    @ApiModelProperty(value = "附加属性")
    private String additionalAttribute;

    @ApiModelProperty(value = "别名")
    private String alias;

    @ApiModelProperty(value = "设备类型 1.a设备 , 0.b设备")
    private Integer type;

    @ApiModelProperty(value = "设备状态  1.在线   0.离线")
    private Integer enabled;

    @ApiModelProperty(value = "组织机构")
    private String organization;

    @ApiModelProperty(value = "成本中心")
    private String costOf;

    @ApiModelProperty(value = "空间管理")
    private String space;

    @ApiModelProperty(value = "空间管理")
    private String DataId;

    @ApiModelProperty(value = "采集周期")
    private String cycle;

    /**
     * 只是方便前端传入参数，不插入数据库
     */
    @ApiModelProperty(value = "属性类型")
    private String attributeType;

    /**
     * 只是方便前端传入参数，不插入数据库
     */
    @ApiModelProperty(value = "属性名称")
    private String attributeAlias;




    /**
     * 属性值参数
     */
    @ApiModelProperty(value = "属性值参数")
    private List<AddressData> attributeList;

    @Data
    @ApiModel(value = "属性值参数", description = "属性值参数")
    public static class AddressData {
        @ApiModelProperty(value = "属性名")
        private String attributeName;
        @ApiModelProperty(value = "是否做差值 1：做，0：不做")
        private String isDifference;
        @ApiModelProperty(value = "属性别名")
        private String attributeAlias;
        @ApiModelProperty(value = "采集周期")
        private String cycle;
        @ApiModelProperty(value = "上限")
        private String up;
        @ApiModelProperty(value = "下限")
        private String down;
        @ApiModelProperty(value = "是否报警 0:不报警 1:报警")
        private String isAlarm;
        @ApiModelProperty(value = "属性类型")
        private String attributeType;
        @ApiModelProperty(value = "DataId")
        private String DataId;
        @ApiModelProperty(value = "偏差")
        private String deviation;
        @ApiModelProperty(value = "推送规则")
        private String pushRole;
        @ApiModelProperty(value = "备注")
        private String remark;
        @ApiModelProperty(value = "后处理")
        private String postProcessing;

        //只在中台下发配置给IOT的时候使用
        @ApiModelProperty(value = "上限")
        private String upLimit;
        @ApiModelProperty(value = "下限")
        private String downLimit;
    }
}
